/* -----------------------------------------------------------------------
 *
 * Include the following lines in your makefile:
 *
 * testunittest1: unittest1.c dominion.o rngs.o
 *      gcc -o testunittest1 -g  unittest1.c dominion.o rngs.o $(CFLAGS)
 * -----------------------------------------------------------------------
 */#include "dominion.h"
#include "dominion_helpers.h"
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include "rngs.h"

// set NOISY_TEST to 0 to remove printfs from output

//If NOISY is set to 0, then only an overall pass/fail will display.
//If NOISY is set to 1, then the cost of each card will be displayed.
#define NOISY 1

int main() {
        int cost;

    printf ("Testing getCost(): \n");

        cost = getCost(curse);
#if (NOISY == 1)
        printf("Cost of curse should be 0\n");

#endif
        assert(cost == 0);
#if (NOISY == 1)

        printf("Cost of curse: %d\n", cost);
#endif

        cost = getCost(estate);
#if (NOISY == 1)
        printf("Cost of estate should be 2\n");

#endif
        assert(cost == 2);
#if (NOISY == 1)

        printf("Cost of estate: %d\n", cost);
#endif

        cost = getCost(duchy);
#if (NOISY == 1)
        printf("Cost of duchy should be 5\n");

#endif
        assert(cost == 5);
#if (NOISY == 1)

        printf("Cost of duchy: %d\n", cost);
#endif

        cost = getCost(province);
#if (NOISY == 1)
        printf("Cost of province should be 8\n");

#endif
        assert(cost == 8);
#if (NOISY == 1)

        printf("Cost of province: %d\n", cost);
#endif

        cost = getCost(copper);
#if (NOISY == 1)
        printf("Cost of copper should be 0\n");

#endif
        assert(cost == 0);

#if (NOISY == 1)

        printf("Cost of copper: %d\n", cost);
#endif

        cost = getCost(silver);
#if (NOISY == 1)
        printf("Cost of silver should be 3\n");

#endif
        assert (cost == 3);
#if (NOISY == 1)

        printf("Cost of silver: %d\n", cost);
#endif

        cost = getCost(gold);
#if (NOISY == 1)
        printf("Cost of gold should be 6\n");

#endif
        assert (cost == 6);
#if (NOISY == 1)

        printf("Cost of gold: %d\n", cost);
#endif

        cost = getCost(adventurer);
#if (NOISY == 1)
        printf("Cost of adventurer should be 6\n");

#endif
        assert( cost == 6);
#if (NOISY == 1)

        printf("Cost of adventurer: %d\n", cost);
#endif

        cost = getCost(council_room);
#if (NOISY == 1)
        printf("Cost of council_room should be 5\n");

#endif
        assert (cost== 5);
#if (NOISY == 1)

        printf("Cost of council_room: %d\n", cost);
#endif

        cost = getCost(feast);
#if (NOISY == 1)
        printf("Cost of feast should be 4\n");

#endif
        assert(cost == 4);
#if (NOISY == 1)

        printf("Cost of feast: %d\n", cost);
#endif

        cost = getCost(gardens);
#if (NOISY == 1)
        printf("Cost of gardens should be 4\n");

#endif
            assert(cost==4);
#if (NOISY == 1)

        printf("Cost of gardens: %d\n", cost);
#endif

        cost = getCost(mine);
#if (NOISY == 1)
        printf("Cost of mine should be 5\n");

#endif
        assert(cost == 5);
#if (NOISY == 1)

        printf("Cost of mine: %d\n", cost);
#endif

        cost = getCost(remodel);
#if (NOISY == 1)
        printf("Cost of remodel should be 4\n");

#endif
        assert(cost == 4);
#if (NOISY == 1)

        printf("Cost of remodel: %d\n", cost);
#endif

        cost = getCost(smithy);
#if (NOISY == 1)
        printf("Cost of smithy should be 4\n");

#endif
        assert(cost == 4);
#if (NOISY == 1)

        printf("Cost of smithy: %d\n", cost);
#endif

        cost = getCost(village);
#if (NOISY == 1)
        printf("Cost of village should be 3\n");

#endif
        assert(cost == 3);
#if (NOISY == 1)

        printf("Cost of village: %d\n", cost);
#endif

        cost = getCost(baron);
#if (NOISY == 1)
        printf("Cost of baron should be 4\n");
        assert(cost == 4);
#endif
#if (NOISY == 1)
        printf("Cost of baron: %d\n", cost);
#endif

        cost = getCost(great_hall);
#if (NOISY == 1)
        printf("Cost of great_hall should be 3\n");

#endif
    assert(cost == 3);
#if (NOISY == 1)

        printf("Cost of great_hall: %d\n", cost);
#endif

        cost = getCost(minion);
#if (NOISY == 1)
        printf("Cost of minion should be 5\n");

#endif
    assert(cost == 5);
#if (NOISY == 1)

        printf("Cost of minion: %d\n", cost);
#endif

        cost = getCost(steward);
#if (NOISY == 1)
        printf("Cost of steward should be 3\n");

#endif
        assert(cost == 3);

#if (NOISY == 1)

        printf("Cost of steward: %d\n", cost);
#endif

        cost = getCost(tribute);
#if (NOISY == 1)
        printf("Cost of tribute should be 5\n");

#endif
        assert(cost == 5);
#if (NOISY == 1)

        printf("Cost of tribute: %d\n", cost);
#endif

        cost = getCost(ambassador);
#if (NOISY == 1)
        printf("Cost of ambassador should be 3\n");

#endif
        assert(cost == 3);
#if (NOISY == 1)

        printf("Cost of ambassador: %d\n", cost);
#endif

        cost = getCost(cutpurse);
#if (NOISY == 1)
        printf("Cost of cutpurse should be 4\n");

#endif
        assert(cost == 4);
#if (NOISY == 1)

        printf("Cost of cutpurse: %d\n", cost);
#endif

        cost = getCost(embargo);
#if (NOISY == 1)
        printf("Cost of embargo should be 2\n");

#endif

        assert(cost == 2);
#if (NOISY == 1)

        printf("Cost of embargo: %d\n", cost);
#endif

        cost = getCost(outpost);
#if (NOISY == 1)
        printf("Cost of outpost should be 5\n");

#endif
        assert(cost == 5);
#if (NOISY == 1)

        printf("Cost of outpost: %d\n", cost);
#endif

        cost = getCost(salvager);
#if (NOISY == 1)
        printf("Cost of salvagershould be 4\n");

#endif
        assert(cost == 4);
#if (NOISY == 1)

        printf("Cost of salvager: %d\n", cost);
#endif

        cost = getCost(sea_hag);
#if (NOISY == 1)
        printf("Cost of sea_hag should be 4\n");

#endif
        assert(cost == 4);
#if (NOISY == 1)

        printf("Cost of sea_hag: %d\n", cost);
#endif

        cost = getCost(treasure_map);
#if (NOISY == 1)
        printf("Cost of treasure_map should be 4\n");
#endif
        assert(cost == 4);
#if (NOISY == 1)

        printf("Cost of treasure_map: %d\n", cost);
#endif


    printf("All tests passed!\n");

    return 0;
}
